package org.example.wax.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;

@Validated
@Component
@ConfigurationProperties(prefix = "cabinet")
public class CabinetProperties {

    @NotBlank(message = "cabinet.sn未设置")
    private String sn;

    @NotBlank(message = "cabinet.inventoryCallback未设置")
    private String inventoryCallback;

    @NotBlank(message = "cabinet.closedCallback未设置")
    private String closedCallback;

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getInventoryCallback() {
        return inventoryCallback;
    }

    public void setInventoryCallback(String inventoryCallback) {
        this.inventoryCallback = inventoryCallback;
    }

    public String getClosedCallback() {
        return closedCallback;
    }

    public void setClosedCallback(String closedCallback) {
        this.closedCallback = closedCallback;
    }
}
